package com.example.productmanagerspringboot.controller;

import com.example.productmanagerspringboot.data.vo.Response;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController//会把返回的对象数据转换为json
public class TestController {
    @GetMapping("test")
    public ResponseEntity<Response> hello() {
        return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(new Response("q", 500));
    }

}
